import Router from 'koa-router';
import uploadFile from '../../../controller/api/common/uploadFile';
import { getTaskIdByUrl, getTextById } from '../../../controller/api/common/voice';
import { getVoiceData } from '../../../controller/api/common/voiceHeCheng';
import { getRobotText } from '../../../controller/api/common/robot';
import { ocrCard, verifyIdCard } from '../../../controller/api/common/idCard'

const commonRouter = new Router();

// 上传文件
commonRouter.post('/uploadFile', uploadFile);

// 获取语音识别id
commonRouter.post('/getVoiceId', getTaskIdByUrl);

// 通过语音识别id获取语音识别内容
commonRouter.post('/getTextById', getTextById);

// 通过文字获取语音合成数据
commonRouter.post('/getVoiceData', getVoiceData);

// 后去机器人交互的结果
commonRouter.post('/getRobotText', getRobotText);

// 身份证识别
commonRouter.post('/idCardOcr', ocrCard);

//身份证校验
commonRouter.post('/idCardVerify', verifyIdCard);

export default commonRouter;
